Skip to content

Reflect broken symlinks in resources model - #2798

Open
iloveeclipse wants to merge 1 commit into
eclipse-platform:masterfrom
iloveeclipse:broken_symlink_support
Open

Reflect broken symlinks in resources model#2798
iloveeclipse wants to merge 1 commit into
eclipse-platform:masterfrom
iloveeclipse:broken_symlink_support

Conversation

@iloveeclipse

@iloveeclipse iloveeclipse commented Jul 3, 2026

Copy link
Copy Markdown
Member

For link overlays we need an additional patch in Platform UI (eclipse-platform/eclipse.platform.ui#4158).

Fixes #2797

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Test Results

    54 files  ±0      54 suites  ±0   57m 39s ⏱️ + 1m 50s
 4 699 tests +1   4 677 ✅ +1   22 💤 ±0  0 ❌ ±0 
11 991 runs  +3  11 836 ✅ +1  155 💤 +2  0 ❌ ±0 

Results for commit fc29ebb. ± Comparison against base commit 6acf84a.

♻️ This comment has been updated with latest results.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Eclipse Core Resources / EFS stack so broken (dangling) symbolic links are surfaced in the workspace resource model (enabling UI overlays and user visibility/removal), including Linux-native support and accompanying regression tests.

Changes:

  • Treat dangling symlinks as “present” resources in workspace tree logic and attribute lookup (so they appear in members/refresh and can be deleted).
  • Preserve symlink metadata (lstat) for dangling links in Linux native implementations, and expose link target/attributes via EFS.
  • Add/extend tests to validate dangling symlink visibility and “read as empty content” behavior.

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/internal/localstore/SymlinkResourceTest.java Adds a workspace-level regression test ensuring broken symlinks appear as child IFile resources and behave safely for read APIs.
resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/filesystem/SymlinkTest.java Extends filesystem-level tests for broken symlink timestamps/lengths and recursive symlink existence expectations.
resources/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ResourceTree.java Ensures deletes don’t treat broken symlinks as “nonexistent on disk”.
resources/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/localstore/UnifiedTreeNode.java Treats symlink nodes as existing in filesystem even when targets are missing.
resources/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/localstore/FileSystemResourceManager.java Returns ResourceAttributes for broken symlinks (instead of null).
resources/bundles/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/local/LocalFile.java Makes read APIs return empty content for dangling symlinks rather than erroring as “file not found”.
resources/bundles/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/local/linux/LinuxFileNatives.java Preserves symlink-node metadata for dangling links (while keeping “target missing” exists=false semantics).
resources/bundles/org.eclipse.core.filesystem/natives/unix/fastlinux/fastlinuxfile.c Retains lstat data for dangling links when following the link fails during directory listing/stat conversion.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Broken file links were not present in resource model before, now they
are (at least on Linux x86_64, in the future hopefully on all Unix
platforms).

For "broken" link overlays we need an additional patch in Platform UI.

Fixes eclipse-platform#2797
@iloveeclipse
iloveeclipse force-pushed the broken_symlink_support branch from de6092f to fc29ebb Compare July 30, 2026 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Broken symlinks not reflected in Eclipse resources model

2 participants